import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import AppHome from '@/pages/appHome/AppHome.vue'
import { Terminal, Accessibility, TextSharp, Backspace } from '@vicons/ionicons5'

const routes: Array<RouteRecordRaw> = [
	{
		path: '/',
		component: AppHome,
		name: '首页',
		children: [
			{
				path: '/',
				name: '测试一',
				meta: {
					icon: Terminal
				},
				component: () => import('@/pages/appHome/homeContent/homeText1/HomeTest1.vue')
			},
			{
				path: '/test-1-1-1',
				name: '测试二',
				meta: {
					icon: Accessibility
				},
				component: () => import('@/pages/appHome/homeContent/homeText2/HomeTest2.vue')
			},
			{
				path: '/test3',
				name: '测试3',
				meta: {
					icon: TextSharp
				},
				redirect: '/test3/1/1',
				children: [
					{
						path: '/test3/3',
						name: '测试3-1',
						meta: {
							icon: Backspace
						},
						redirect: '/test3/1/1',
						children: [
							{
								path: '/test3/1/1',
								name: '测试3-1-1',
								meta: {
									icon: Terminal
								},
								component: () => import('@/pages/appHome/homeContent/homeText3/HomeTest3.vue')
							}
						]
					}
				]
			}
		]
	},
	{
		path: '/login',
		name: 'login',
		component: () => import(/* webpackChunkName: "login" */ '@/pages/appLogin/AppLogin.vue')
	}
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router
